package com.devunion.salon.client.rpc;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.core.client.GWT;
import com.devunion.salon.client.util.RequestUtil;
import com.devunion.salon.client.app.bean.ProductModel;
import com.devunion.salon.client.app.bean.OfficeBeanModel;
import com.devunion.salon.client.app.bean.VendorModel;
import com.devunion.salon.client.app.bean.search.ProductSearchPagingLoadConfig;
import com.extjs.gxt.ui.client.data.*;

/**
 * Created by IntelliJ IDEA.
 * User: Andrei
 * Date: 08.03.2009
 * Time: 0:01:36
 * To change this template use File | Settings | File Templates.
 */
public interface VendorService extends RemoteService {
                 public static class App {
        private static VendorServiceAsync async;

        public static VendorServiceAsync getInstance() {
            if (async == null) {
                async = (VendorServiceAsync) GWT.create(VendorService.class);
                ((ServiceDefTarget) async).setServiceEntryPoint(RequestUtil.getContextPath() +
                        "VendorService.page");
            }
            return async;
        }
    }

   PagingLoadResult<VendorModel> findVendors(BasePagingLoadConfig config);

   boolean updateVendor(String origCode, String code, String address);
    
}
